<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0047)http://www.turnkeylinux.org/blog/django-profile -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" class="js"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

	<title>Django User Profiles - Simple yet powerful | TurnKey Linux Blog</title>
    <link rel="canonical" href="./User Profiles_files/User Profiles.htm">
	
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="http://cdn.turnkeylinux.org/">
<script type="text/javascript" async="" src="./User Profiles_files/ga.js"></script><script type="text/javascript">window.CKEDITOR_BASEPATH = "/sites/all/modules/ckeditor/ckeditor/";</script>
<link rel="shortcut icon" href="http://cdn.turnkeylinux.org/sites/all/themes/turnkey/favicon.ico" type="image/x-icon">
	<!-- CSS aggregated by CDN module. -->
<link type="text/css" rel="stylesheet" media="all" href="./User Profiles_files/cdn_css_6a4eb0d87db9228e3cdccada99ab6313_views.css">
<link type="text/css" rel="stylesheet" media="all" href="./User Profiles_files/cdn_css_6a4eb0d87db9228e3cdccada99ab6313.css">
<!-- CSS aggregated by CDN module. -->
	<script type="text/javascript" src="./User Profiles_files/js_f171c2a6f13d71b16e4f78c360221430.js"></script>
<script type="text/javascript" src="./User Profiles_files/ckeditor.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip" }, "hashcash": { "url": "/hashcash" }, "ckeditor": { "module_path": "/sites/all/modules/ckeditor", "editor_path": "/sites/all/modules/ckeditor/ckeditor", "ajaxToken": "49c9cf1bf2691d187cbd82bbba2ac5d7", "theme": "turnkey", "settings": { "edit-comment": { "customConfig": "/sites/all/modules/ckeditor/ckeditor.config.js?1331813467", "defaultLanguage": "en", "toolbar": "\n[\n    [ \'Format\', \'Bold\', \'Italic\', \'-\', \'NumberedList\',\'BulletedList\', \'-\', \'Link\', \'Unlink\', \'Image\' ]\n]\n      ", "enterMode": 1, "shiftEnterMode": 2, "toolbarStartupExpanded": true, "width": "694", "height": 350, "skin": "kama", "format_tags": "p;div;pre;address;h1;h2;h3;h4;h5;h6", "scayt_autoStartup": false, "stylesCombo_stylesSet": "drupal:/sites/all/modules/ckeditor/ckeditor.styles.js", "contentsCss": [ "/sites/all/modules/ckeditor/ckeditor.css?a", "/sites/all/themes/turnkey//css/ckeditor.css?a" ], "uiColor": "#EFEFDE", "filters": [ "filter/0/1", "filter/3/1" ] } }, "autostart": { "edit-comment": true } }, "luceneapi_facet": { "luceneapi_node": { "limit": "0" } }, "views": { "ajax_path": [ "/views/ajax", "/views/ajax" ], "ajaxViews": [ { "view_name": "blog", "view_display_id": "block_3", "view_args": "", "view_path": "node/1076", "view_base_path": "blog", "view_dom_id": 1, "pager_element": 0 }, { "view_name": "archive", "view_display_id": "block", "view_args": "", "view_path": "node/1076", "view_base_path": "blog/archive", "view_dom_id": 3, "pager_element": 0 } ] }, "custom_search_target": "_self" });
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
$(document).ready(function(){
 $('ul#superfish-1').supersubs({
 minWidth: 12,
 maxWidth: 27,
 extraWidth: 1
}).superfish({
 delay: 1000,
animation: {opacity:'show',height:'show'},
 speed: 'fast',
 autoArrows: true,
 dropShadows: true
})
});
//--><!]]>
</script>
	<script type="text/javascript"> </script> 
<script type="text/javascript" src="./User Profiles_files/ckeditor.config.js"></script><style id="cke_ui_color" type="text/css"></style><link rel="stylesheet" type="text/css" href="./User Profiles_files/editor.css"><script type="text/javascript" src="./User Profiles_files/zh-cn.js"></script></head>
<body class="sidebar-left">
  <div id="container">
    <div id="content">

      <div id="top">&nbsp;</div>
      <a id="homelink" title="Library of Appliances for Virtual Machines, Cloud Computing, Bare Metal" href="http://www.turnkeylinux.org/">TurnKey Linux Virtual Appliance Library</a>

      <!-- optional masthead -->
      
      <!-- begin content area -->
      <!-- top -->
      <div id="bodyouter">
        <div id="center">
          <div id="squeeze">
                        <div id="breadcrumb" class="breadcrumb">
              <h3>You are here:</h3>
                
              <a href="http://www.turnkeylinux.org/">Home</a> » <a href="http://www.turnkeylinux.org/blog">Blog</a> » Django User Profiles - Simple yet powerful            </div>
                                                            
<div id="node-1076" class="node node-blog status-page">

    <div id="subscribe"><a title="Receive blog updates by RSS" class="rss" href="http://www.turnkeylinux.org/blog/feed">Subscribe</a> | <a rel="nofollow" title="Receive blog updates by e-mail" href="http://feedburner.google.com/fb/a/mailverify?uri=turnkeylinux-blog">By Email</a></div>
    <div class="tags"><ul class="links inline"><li class="taxonomy_term_54 first"><a href="http://www.turnkeylinux.org/blog/development" rel="tag" title="">development</a></li>
<li class="taxonomy_term_68 last"><a href="http://www.turnkeylinux.org/blog/django" rel="tag" title="">django</a></li>
</ul></div>
    
    <div class="blog-item">
        <h1 class="title">
            <a href="./User Profiles_files/User Profiles.htm">Django User Profiles - Simple yet powerful</a>
        </h1>
       
        
                <span class="submitted">By <a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> 
         - <a class="comment-count" title="36 comments" href="http://www.turnkeylinux.org/blog/django-profile#comments">36 comments</a> | Latest by simon
         </span>

       
        <div class="content"><p>
	So you're building a web application, and using the excellent <em>contrib.auth</em> subsystem to manage user accounts. Most probably you need to store additional information about your users, but how? Django profiles to the rescue!</p>
<p>
	<a href="http://www.djangoproject.org/">Django</a> provides a lightweight way of defining a <em>profile object</em> linked to a given user. The profile object can differ from project to project, and it can even handle different profiles for different sites served from the same database.</p>
<p>
	In a nutshell, using Django profiles consists of 3 steps:</p>
<ul>
	<li>
		Define a model that holds the profile information.</li>
	<li>
		Tell Django where to look for the profile object.</li>
	<li>
		Create the user profile as needed.</li>
</ul>
<p>
	&nbsp;</p>
<h2>
	Defining the user profile model</h2>
<p>
	The only requirement Django places on this model is that it have a unique ForeignKey to the User model, and is called user. Other than that, you can define any other fields you like.</p>
<p>
	For our example, we'll create 2 user profile fields (url and company).</p>
<pre class="prettyprint"><code><u><strong><span class="pln">account</span><span class="pun">/</span><span class="pln">models</span><span class="pun">.</span><span class="pln">py</span></strong></u><span class="pln"><br><br></span><span class="kwd">from</span><span class="pln"> django</span><span class="pun">.</span><span class="pln">db </span><span class="kwd">import</span><span class="pln"> models<br></span><span class="kwd">from</span><span class="pln"> django</span><span class="pun">.</span><span class="pln">contrib</span><span class="pun">.</span><span class="pln">auth</span><span class="pun">.</span><span class="pln">models </span><span class="kwd">import</span><span class="pln"> </span><span class="typ">User</span><span class="pln"><br><br></span><span class="kwd">class</span><span class="pln"> </span><span class="typ">UserProfile</span><span class="pun">(</span><span class="pln">models</span><span class="pun">.</span><span class="typ">Model</span><span class="pun">):</span><span class="pln"><br>&nbsp; &nbsp; user </span><span class="pun">=</span><span class="pln"> models</span><span class="pun">.</span><span class="typ">ForeignKey</span><span class="pun">(</span><span class="typ">User</span><span class="pun">,</span><span class="pln"> unique</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)</span><span class="pln"><br>&nbsp; &nbsp; url </span><span class="pun">=</span><span class="pln"> models</span><span class="pun">.</span><span class="typ">URLField</span><span class="pun">(</span><span class="str">"Website"</span><span class="pun">,</span><span class="pln"> blank</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)</span><span class="pln"><br>&nbsp; &nbsp; company </span><span class="pun">=</span><span class="pln"> models</span><span class="pun">.</span><span class="typ">CharField</span><span class="pun">(</span><span class="pln">max_length</span><span class="pun">=</span><span class="lit">50</span><span class="pun">,</span><span class="pln"> blank</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)</span><span class="pln"><br></span></code></pre>
<p>
	&nbsp;</p>
<h2>
	Tell Django about the profile object</h2>
<p>
	Accessing a users profile is done by calling <em>user.get_profile()</em>, but in order to use this function, Django needs to know where to look for the profile object.</p>
<p>
	This is defined in the projects <em>settings.py</em> file.</p>
<pre>AUTH_PROFILE_MODULE = "account.UserProfile"
</pre>
<p>
	<strong>Important note:</strong> The settings value is <em>appname.modelname</em>, and not <em>appname.models.modelname</em> as you might expect. The reason for this is that Django is not doing a direct import, but using an internal model-loading function.</p>
<p>
	Once defined, and <em>if the profile exists</em>, accessing a users profile is simple.</p>
<pre class="prettyprint"><code><u><strong><span class="pln">foo</span><span class="pun">/</span><span class="pln">views</span><span class="pun">.</span><span class="pln">py</span></strong></u><span class="pln"><br><br></span><span class="lit">@login_required</span><span class="pln"><br></span><span class="kwd">def</span><span class="pln"> view_foo</span><span class="pun">(</span><span class="pln">request</span><span class="pun">):</span><span class="pln"><br>&nbsp; &nbsp; user_profile </span><span class="pun">=</span><span class="pln"> request</span><span class="pun">.</span><span class="pln">user</span><span class="pun">.</span><span class="pln">get_profile</span><span class="pun">()</span><span class="pln"><br>&nbsp; &nbsp; url </span><span class="pun">=</span><span class="pln"> user_profile</span><span class="pun">.</span><span class="pln">url<br><br>&nbsp; &nbsp; </span><span class="com">#OR</span><span class="pln"><br>&nbsp; &nbsp; url </span><span class="pun">=</span><span class="pln"> request</span><span class="pun">.</span><span class="pln">user</span><span class="pun">.</span><span class="pln">get_profile</span><span class="pun">().</span><span class="pln">url<br></span></code></pre>
<p>
	&nbsp;</p>
<h2>
	Create the user profile as needed</h2>
<p>
	Notice in the section above I mentioned <em>"if the profile exists"</em>. This is because the <em>get_profile()</em> function will raise a <em>DoesNotExist</em> exception if the profile does not exist.</p>
<p>
	One of the common solutions to this issue is to create the profile when a user is registered using a signal (see my post on <a href="http://www.turnkeylinux.org/blog/django-signals">Django Signals</a>).</p>
<p>
	Another option is catch the exception, and redirect the user to a profile creation form. You usually want to do this if the profile fields are mandatory.</p>
<p>
	My personal favorite though, is to have the profile created automatically when referenced, with the added bonus of being able to reference a users profile as <em>user.profile</em> instead of <em>user.get_profile()</em></p>
<pre class="prettyprint"><code><u><strong><span class="pln">account</span><span class="pun">/</span><span class="pln">models</span><span class="pun">.</span><span class="pln">py</span></strong></u><span class="pln"><br><br></span><span class="pun">...</span><span class="pln"><br></span><span class="kwd">class</span><span class="pln"> </span><span class="typ">UserProfile</span><span class="pun">(</span><span class="pln">models</span><span class="pun">.</span><span class="typ">Model</span><span class="pun">):</span><span class="pln"><br>&nbsp; &nbsp; user </span><span class="pun">=</span><span class="pln"> models</span><span class="pun">.</span><span class="typ">ForeignKey</span><span class="pun">(</span><span class="typ">User</span><span class="pun">,</span><span class="pln"> unique</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">...</span><span class="pln"><br><br></span><strong><span class="typ">User</span><span class="pun">.</span><span class="pln">profile </span><span class="pun">=</span><span class="pln"> property</span><span class="pun">(</span><span class="kwd">lambda</span><span class="pln"> u</span><span class="pun">:</span><span class="pln"> </span><span class="typ">UserProfile</span><span class="pun">.</span><span class="pln">objects</span><span class="pun">.</span><span class="pln">get_or_create</span><span class="pun">(</span><span class="pln">user</span><span class="pun">=</span><span class="pln">u</span><span class="pun">)[</span><span class="lit">0</span><span class="pun">])</span></strong><span class="pln"><br></span></code></pre>
<p>
	&nbsp;</p>
<p>
	To reiterate, including the above enables us to reference the users profile with cleaner code, and have it created if it does not exist.</p>
<pre class="prettyprint"><code><u><strong><span class="pln">foo</span><span class="pun">/</span><span class="pln">views</span><span class="pun">.</span><span class="pln">py</span></strong></u><span class="pln"><br><br></span><span class="lit">@login_required</span><span class="pln"><br></span><span class="kwd">def</span><span class="pln"> view_foo</span><span class="pun">(</span><span class="pln">request</span><span class="pun">):</span><span class="pln"><br>&nbsp; &nbsp; url </span><span class="pun">=</span><span class="pln"> request</span><span class="pun">.</span><span class="pln">user</span><span class="pun">.</span><span class="pln">profile</span><span class="pun">.</span><span class="pln">url<br></span></code></pre>
<p>
	&nbsp;</p>
<p>
	<strong>Ever needed to store additional user information? <a href="http://www.turnkeylinux.org/blog/django-profile#comment-form">Post a comment</a>!</strong></p>
</div>

                    <div class="after-post-message">
                <div>
                    Enjoyed this post? Get future posts <a href="http://feedburner.google.com/fb/a/mailverify?uri=turnkeylinux-blog">delivered
                    by email</a> or <a href="http://www.turnkeylinux.org/blog/feed">get the RSS
                    feed</a>. <br>Find us on <a href="http://www.facebook.com/turnkeylinux">Facebook</a> and <a href="http://twitter.com/turnkeylinux">Twitter</a>.</div><div class="fb-bottom">
<iframe src="data:text/html,chromewebdata" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:55px; height:65px;" allowtransparency="true"></iframe>
</div><div class="rt-bottom">    <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
    <div>
       <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.turnkeylinux.org/blog/django-profile" data-via="turnkeylinux" data-text="Django User Profiles - Simple yet powerful" data-related="alonswartz:lirazsiri" data-count="vertical">Tweet</a>
    </div>
</div></div>
    </div>
<div class="mtime">Last update: Mon, April 16 - 10:58</div></div>

<div id="comments">
    <a href="http://www.turnkeylinux.org/blog/django-profile#comments"><h2>Comments</h2></a>
  
  <a id="comment-2534"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-2534" class="active">Hi Alon, thanks for the</a></h2>

    <div class="submitted">cico - April 14, Wed 04:06.</div>
    <div class="content"><p>
	Hi Alon, thanks for the interesting and clear post!</p>
<p>
	I'm currently trying to write a django application that should be based on more than one user profile.. How would your solution coexist with an abstract base-profile? Subclasses could be handled (and attached) on creation with signals or with the (very nice!) User.profile function, but what about the base one?</p>
<p>
	Thank you very much,</p>
<p>
	cico</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/2534">reply</a></li>
</ul></div>
</div>
<a id="comment-2536"></a>
<div class="comment comment-by-author-of-post comment-published even">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/alon" title="View user profile."><img src="./User Profiles_files/picture-1.png" alt="Alon Swartz&#39;s picture" title="Alon Swartz&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-2536" class="active">ForeignKey ?</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> - April 14, Wed 13:47.</div>
    <div class="content"><p>
	Thanks for the feedback. I'm not quite sure what you mean, Django User Profiles are a simple way to associate additional information to your user accounts. If you need to associate other models to a user account, then you should use a foreign key.</p>
<pre><u><strong>foo/models.py
</strong></u>
from django.db import models
from django.contrib.auth.models import User

class Foo(models.Model):
    user = models.ForeignKey(User)
    stuff = models.CharField(max_length=50)
    ...
</pre>
<p>
	You could then refer to the associated user <em>foo's</em> with something like this:</p>
<pre><u><strong>foo/views.py</strong></u>

from django.contrib.auth.decorators import login_required

@login_required
def bar(request):
    foos = request.user.foo_set.all()  <em># or any of the other useful methods</em>
    ...

</pre>
<p>
	I hope the above helps, if not, the more info you can provide, the easier it will be to help.</p>
</div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/2536">reply</a></li>
</ul></div>
</div>
<a id="comment-3842"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-3842" class="active">Why do Django profiles exist</a></h2>

    <div class="submitted">Stodge - August 11, Wed 21:00.</div>
    <div class="content"><p>
	Why do Django profiles exist when you can just define another model with a foreign key to the user model? Is it simply to define a standard profiling system? It seems odd that it re-creates a profile model with a foreign key yet forces you to use a function to retrieve it (get_profile) instead of just giving you: user.profile.</p>
<p>
	&nbsp;</p>
<p>
	Thanks,&nbsp;Mike</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/3842">reply</a></li>
</ul></div>
</div>
<a id="comment-4587"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-4587" class="active">I am sure django is powerful</a></h2>

    <div class="submitted">reverse phone lookup - September 22, Wed 12:31.</div>
    <div class="content"><p>
	I am sure django is powerful and quite useful. The applications in “contrib.” package are very tempting.Especially the tools for generating rss and atom feed.But django is not free from problem. It just isn’t effective enough. It lacks a bit on creating boundary pushing models effectively. Is it possible to use sphinx for our documentation is this tool compatible with django? I have read some where piston is very useful in creating API’s. Is it so?</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/4587">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-4609"></a>
<div class="comment comment-published odd">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/liraz" title="View user profile."><img src="./User Profiles_files/picture-2.jpg" alt="Liraz Siri&#39;s picture" title="Liraz Siri&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-4609" class="active">Are you a bot? If so, can you pass the turing test?</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/liraz" title="View user profile.">Liraz Siri</a> - September 22, Wed 19:21.</div>
    <div class="content"><p>
	Most of the comments that try to take advantage of the Drupal comment external backlink are posted by automated spam bots. We usually delete those immediately. But your response is eerily relevant to the discussion so I suspect you may be a human.</p>
<p>
	Please don't take offense. As far as I'm concerned you're welcome to join the community even if you are a bot - so long as you can pass my turing test and respond appropriately.</p>
<p>
	TurnKey welcomes all sentient beings.</p>
</div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/4609">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-5334"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-5334" class="active">Nice. I like when</a></h2>

    <div class="submitted">Guest - October 27, Wed 20:13.</div>
    <div class="content"><p>
	Nice. I like when administrators or moderators treat comments in such a way.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/5334">reply</a></li>
</ul></div>
</div>
</div><a id="comment-6476"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-6476" class="active">Well, it has been some time</a></h2>

    <div class="submitted">Rapid Prototyping - January 05, Wed 18:28.</div>
    <div class="content"><p>
	Well, it has been some time since I have been looking out for something like this. I often indulge in building web applications and I too use the same subsystem contrib.auth for the purpose of managing my accounts. Things are really great, to be honest, except for the fact that I have to store extra information regarding the users. Anyway, since I started using Django, things have really been great from then on! The fact that it provides a really easy way of defining things is why I found it handy!</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/6476">reply</a></li>
</ul></div>
</div>
</div><a id="comment-5927"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-5927" class="active">creating the profile</a></h2>

    <div class="submitted">ryan - December 01, Wed 22:40.</div>
    <div class="content"><p>
	Hi Alon,</p>
<p>
	What is the python-level code for creating users' profiles? In the shell, whenever I type "p=User.objects.get(username='xxxx').get_profile" followed by "p.attribute1", I receive a "'User' object has no attribute 'attribute1'.</p>
<p>
	Any suggestions for creating the profile to make sure this attribute "registers"? Thanks!</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/5927">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-5939"></a>
<div class="comment comment-by-author-of-post comment-published odd">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/alon" title="View user profile."><img src="./User Profiles_files/picture-1.png" alt="Alon Swartz&#39;s picture" title="Alon Swartz&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-5939" class="active">get_profile is a function</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> - December 02, Thu 11:41.</div>
    <div class="content"><p>
	get_profile is a function, so you need to call it. Using your example you would do something like this:</p>
<pre>from django.contrib.auth.models import User

p = User.objects.get(username="xxxx").get_profile<strong>()  # notice the ()
</strong>print p.attribute1<bound method="" of="" turnkeylinux.org="" userprofile.email="" userprofile:="">
</bound></pre>
<p>
	But, depending on your code and what you want to do, I would recommend re-reading the code snippets in the blog post, and use user.profile.attribute instead, it's more elegant.</p>
</div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/5939">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-6318"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-6318" class="active">follow-up question</a></h2>

    <div class="submitted">ryan - December 28, Tue 04:01.</div>
    <div class="content"><p>
	Hi again Alon, Thanks for your earlier reply. I'm getting back to Django after a long holiday vacation (I hope you enjoyed one too!), and I revisited your answer.</p>
<p>
	I think I figured out my problem, and I thought it may be helpful for others if I post this here. Also, I welcome your thoughts on my quick-and-dirty/DIY/band-aid fix.</p>
<p>
	I realized that setting up profiles according to your instructions doesn't actually create profiles for pre-existing users. So when typing "get_profile()" it always returned an error, even though I <strong>knew</strong> the users existed and had attributes.</p>
<p>
	In response to my own question, I figured out how to create user profiles for pre-existing users. First is assigning the user object: "u=User.objects.get(username="xxxx")". Then you must type: "u.userprofile_set.get_or_create(field1=foo, field2=bar, attribute3=foobar)". This creates the profile with the assigned field values.</p>
<p>
	Of course, this could all be done in a view. And it could also be re-coded to match your elegant suggestion. But this at least is how I got it to work code-level.</p>
<p>
	One question, though: do you know of a way to update the values once they're set?</p>
<p>
	Thoughts? Suggestions (other than for elegance)?</p>
<p>
	Thanks again, Alon!</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/6318">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-6321"></a>
<div class="comment comment-by-author-of-post comment-published odd">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/alon" title="View user profile."><img src="./User Profiles_files/picture-1.png" alt="Alon Swartz&#39;s picture" title="Alon Swartz&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-6321" class="active">Glad you got it sorted</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> - December 28, Tue 10:54.</div>
    <div class="content"><p>
	Glad you got it sorted. Take another look at account/models.py in my original post - it will get the profile if it exists or create it when it doesn't.</p>
<p>
	Regarding updating values, it's a regular model, so once you have the user/profile object, just update the values and call save().</p>
</div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/6321">reply</a></li>
</ul></div>
</div>
</div></div></div><a id="comment-5945"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-5945" class="active">creation error</a></h2>

    <div class="submitted">mart - December 02, Thu 23:20.</div>
    <div class="content"><p>
	Thank you for your explanations but what's the way to create a new custom user then ?</p>
<p>
	I guess I should first create the "normal" user (using User.objects.create_user(,,)) and then the extended one using the foreign key to the newly created user. When I'm using the shell to do it, I've got an error with the first command that the first of my custom field is required...</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/5945">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-5947"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-5947" class="active">Ok forgot what I said, I put</a></h2>

    <div class="submitted">mart - December 03, Fri 01:20.</div>
    <div class="content"><p>
	Ok forgot what I said, I put some code I found <a href="http://stackoverflow.com/questions/44109/extending-the-user-model-with-custom-fields-in-django" rel="nofollow">here</a> that I guess is wrong</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/5947">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-5951"></a>
<div class="comment comment-by-author-of-post comment-published even">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/alon" title="View user profile."><img src="./User Profiles_files/picture-1.png" alt="Alon Swartz&#39;s picture" title="Alon Swartz&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-5951" class="active">I'm not sure I follow your question...</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> - December 03, Fri 09:35.</div>
    <div class="content"><p>
	If you want to manually create a user account you could do it like the following snippet, and then extend the user using the profile method described in the post. But, you might want to use the <a href="http://bitbucket.org/ubernostrum/django-registration/">registration app</a> (and tweak or extend it using <a href="http://www.turnkeylinux.org/blog/django-signals">signals</a>) - depending on your use case.</p>
<pre>user = User.objects.create_user('username', 'foo@example.com', 'password')
</pre>
<p>
	If you have a specific question, or a piece of code isn't working, please post it here together with your models.py as it will be a lot easier to help.</p>
</div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/5951">reply</a></li>
</ul></div>
</div>
</div></div><a id="comment-6146"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-6146" class="active">I love the option of creating</a></h2>

    <div class="submitted">Here - December 16, Thu 21:26.</div>
    <div class="content"><p>
	I love the option of creating a user profile. It really makes a site look professional, and keeps out the riffraff. I don't develop anything without this option.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/6146">reply</a></li>
</ul></div>
</div>
<a id="comment-6790"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-6790" class="active">DatabaseError</a></h2>

    <div class="submitted">Yurietc - January 24, Mon 00:24.</div>
    <div class="content"><p>
	Hello.</p>
<p>
	I have created user profile, but what about the additional table "maApp_userprofile" in my database ? The DatabaseError (1146, "Table 'myApp.myApp_userprofile' doesn't exist") is occurs. And "manage.py syncdb" does nothing. How this table must be created ?</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/6790">reply</a></li>
</ul></div>
</div>
<a id="comment-6987"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-6987" class="active">Nice..</a></h2>

    <div class="submitted">DebT - February 01, Tue 01:36.</div>
    <div class="content"><p>
	I'll need to check out Django now. Looks simple enough.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/6987">reply</a></li>
</ul></div>
</div>
<a id="comment-7262"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-7262" class="active">still stuck....</a></h2>

    <div class="submitted">Guest - February 15, Tue 23:34.</div>
    <div class="content"><p>
	Thanks for the useful post! &nbsp;Where I am still stuck is trying to figure out how to create test users through a command. &nbsp;For example, if I have an app:</p>
<p>
	&nbsp;</p>
<p>
	accounts</p>
<p>
	&nbsp;&nbsp; &nbsp;models.py</p>
<p>
	&nbsp;&nbsp; &nbsp;management</p>
<p>
	&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; commands</p>
<p>
	&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mycommand.py</p>
<p>
	&nbsp;</p>
<p>
	and I follow your lead in models.py:</p>
<p>
	&nbsp;</p>
<p>
	&nbsp;</p>
<pre class="prettyprint"><code><span class="kwd"><span class="kwd">class</span></span><span class="pln"><span class="pln"> </span></span><span class="typ"><span class="typ">UserProfile</span></span><span class="pun"><span class="pun">(</span></span><span class="pln"><span class="pln">models</span></span><span class="pun"><span class="pun">.</span></span><span class="typ"><span class="typ">Model</span></span><span class="pun"><span class="pun">):</span></span><span class="pln"><br></span><span class="pln"><span class="pln">&nbsp; &nbsp; user </span></span><span class="pun"><span class="pun">=</span></span><span class="pln"><span class="pln"> models</span></span><span class="pun"><span class="pun">.</span></span><span class="typ"><span class="typ">ForeignKey</span></span><span class="pun"><span class="pun">(</span></span><span class="typ"><span class="typ">User</span></span><span class="pun"><span class="pun">,</span></span><span class="pln"><span class="pln"> unique</span></span><span class="pun"><span class="pun">=</span></span><span class="kwd"><span class="kwd">True</span></span><span class="pun"><span class="pun">)</span></span><span class="pln"><br></span><span class="pln"><span class="pln">&nbsp; &nbsp; </span></span><span class="pln"><font class="Apple-style-span" color="#666600"><span class="pln">age</span><span class="pun">=</span><span class="pln">models</span><span class="pun">.</span><span class="typ">IntgerField</span><span class="pun">(</span><span class="pln">blank</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)</span><span class="pln"><br></span></font></span><span class="pln">&nbsp; &nbsp; display_name</span><span class="pun">=</span><span class="pln">models</span><span class="pun">.</span><span class="typ">CharField</span><span class="pun">(</span><span class="pln">max_length</span><span class="pun">=</span><span class="lit">150</span><span class="pun">)</span><span class="pln"><br><br></span><strong><span class="typ"><span class="typ">User</span></span><span class="pun"><span class="pun">.</span></span><span class="pln"><span class="pln">profile </span></span><span class="pun"><span class="pun">=</span></span><span class="pln"><span class="pln"> property</span></span><span class="pun"><span class="pun">(</span></span><span class="kwd"><span class="kwd">lambda</span></span><span class="pln"><span class="pln"> u</span></span><span class="pun"><span class="pun">:</span></span><span class="pln"><span class="pln"> </span></span><span class="typ"><span class="typ">UserProfile</span></span><span class="pun"><span class="pun">.</span></span><span class="pln"><span class="pln">objects</span></span><span class="pun"><span class="pun">.</span></span><span class="pln"><span class="pln">get_or_create</span></span><span class="pun"><span class="pun">(</span></span><span class="pln"><span class="pln">user</span></span><span class="pun"><span class="pun">=</span></span><span class="pln"><span class="pln">u</span></span><span class="pun"><span class="pun">)[</span></span><span class="lit"><span class="lit">0</span></span><span class="pun"><span class="pun">])</span><span class="pln"><br><br></span></span></strong></code></pre>
<p>
	&nbsp;</p>
<p>
	What would I put in mycommand.py to create a test user with a username of Bob, no age given, and a display name of Bob Smith? &nbsp;So far, everything I have tried han't actually resulted in the UserProfile which is attached to the user actually being updated in the database.</p>
<p>
	&nbsp;</p>
<p>
	Thanks,</p>
<p>
	William</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/7262">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-7271"></a>
<div class="comment comment-by-author-of-post comment-published odd">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/alon" title="View user profile."><img src="./User Profiles_files/picture-1.png" alt="Alon Swartz&#39;s picture" title="Alon Swartz&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-7271" class="active">Did you save?</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> - February 16, Wed 08:37.</div>
    <div class="content"><p>
	You really should look into using a contrib module to handle user creation for you (such as django-registration), but I suppose it depends on your use-case.</p>
<p>
	Anyway, hopefully the below code snippet will help you get started.</p>
<pre>user = User.objects.create_user('bob', 'bob@example.com', 'password')
user.first_name = "Bob"
user.last_name = "Smith"
user.save()

user_profile = user.get_profile()
user_profile.display_name = "Bob Smith"
<strong>user_profile.save()</strong>
</pre>
<p>
	My guess is you forgot to call save() on the object you created, which is required to write the changes to the database.</p>
<p>
	Also note that I used first_name and last_name as an alternative to "display_name", that's usually how you store account names in Django, you can then access the fullname like this:</p>
<pre>user.get_full_name()</pre>
<p>
	I hope the above helps...</p>
</div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/7271">reply</a></li>
</ul></div>
</div>
</div><a id="comment-7769"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-7769" class="active">back-end</a></h2>

    <div class="submitted">mohamed - March 30, Wed 11:28.</div>
    <div class="content"><p>
	Hey, (sorry for my english :-( )</p>
<p>
	Thanks for this posts !</p>
<p>
	I want to add the Field 'Bureau'&nbsp; the user.</p>
<p>
	I do the same things in your post ;)</p>
<p>
	But I don't have the field 'Bureau' in the back-end of the site ??!!</p>
<p>
	&nbsp;</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/7769">reply</a></li>
</ul></div>
</div>
<a id="comment-8795"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-8795" class="active">Steps to build user accounts</a></h2>

    <div class="submitted">Roland S - June 12, Sun 18:34.</div>
    <div class="content"><p>
	&nbsp;</p>
<p>
	Hi Alon,</p>
<p>
	I've read quite a bit about creating users and it all seems to make sense until I go to make them myself. &nbsp;I find I am missing some crucial bit of information to make it all work.</p>
<p>
	Here is what I think I should do to set up a user accounts:</p>
<p>
	&nbsp;</p>
<p>
	1. Create app called 'accounts'</p>
<p>
	2. In accounts/models.py, create a model for the 'base' user information; username, password, email</p>
<p>
	3.&nbsp;In accounts/models.py, create a second model for the detailed user information; first &amp; last name, favourite colour, etc.</p>
<p>
	4. In accounts/views.py, create functions for new user registration, login, logout, etc.</p>
<p>
	5. In ../settings.py, set&nbsp;AUTH_PROFILE_MODULE = ('accounts.baseUser',)</p>
<p>
	6. In ../urls.py, link views to templates</p>
<p>
	7. In ../templates/registration/accounts make template files for login, etc.</p>
<p>
	&nbsp;</p>
<p>
	Is step 2 correct or should this 'base' user model be handled by contrib.auth.models? &nbsp;In otherwords, do I just need to worry about making models for the extended information and link it to contrib.auth.models.User?</p>
<p>
	&nbsp;</p>
<p>
	You may guess that I am new to Django and obj-oriented programming. &nbsp;I have gone through the Djangoproject.com. &nbsp;Can you share a link to an example where someone sets up the user models, registration, login from scratch as opposed to snippits that I have to figure out how to reassemble?</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/8795">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-8796"></a>
<div class="comment comment-by-author-of-post comment-published even">

    <div class="picture">
  <a href="http://www.turnkeylinux.org/users/alon" title="View user profile."><img src="./User Profiles_files/picture-1.png" alt="Alon Swartz&#39;s picture" title="Alon Swartz&#39;s picture"></a></div>

<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-8796" class="active">You don't need...</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/users/alon" title="View user profile.">Alon Swartz</a> - June 12, Sun 19:31.</div>
    <div class="content"><p>You don't need step 2, actually you must not do anything like step 2 if you want to use contrib.auth</p>

<p>You also don't need to create first/last name fields as you mentioned in step 3 as contrib.auth.models.User already has them. See my <a href="http://www.turnkeylinux.org/blog/django-profile#comment-7271">comment</a> above for more details on that.</p>

<p>You also don't need step 4, contrib.auth handles that for you.</p>

<p>Regarding step 5, I'm don't think using a tuple will work. It should be a string, see the post for an example.</p>

<p>I'd recommend re-reading the post a couple of times, and if something isn't clear let me know and I'll elaborate. If something isn't working, feel free to ask and include code snippets.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/8796">reply</a></li>
</ul></div>
</div>
</div><a id="comment-8806"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-8806" class="active">steps to build user accounts</a></h2>

    <div class="submitted">Roland S - June 13, Mon 14:58.</div>
    <div class="content"><p>
	Thanks, Alon. &nbsp;Your response helps to clarify. &nbsp;I will reread. &nbsp;</p>
<p>
	Roland</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/8806">reply</a></li>
</ul></div>
</div>
<a id="comment-8894"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-8894" class="active">models.ForeignKey(User) Causes Admin Error</a></h2>

    <div class="submitted">Roland S - June 19, Sun 16:39.</div>
    <div class="content"><p>
	Hi Alon,</p>
<p>
	I got rid of the user models I built before and am now relying on the built in user model. &nbsp;I built an app called msgboard that has the following model:</p>
<p>
	&nbsp;</p>
<div id="cke_pastebin">
	from django.db import models</div>
<div id="cke_pastebin">
	from datetime import datetime</div>
<div id="cke_pastebin">
	from django.contrib.auth.models import User</div>
<div id="cke_pastebin">
	&nbsp;</div>
<div id="cke_pastebin">
	class FindMsg (models.Model):</div>
<div id="cke_pastebin">
	&nbsp;&nbsp; &nbsp;msg = models.TextField(max_length=500)</div>
<div id="cke_pastebin">
	&nbsp;&nbsp; &nbsp;pub_date = models.DateTimeField('date published')</div>
<div id="cke_pastebin">
	&nbsp;&nbsp; &nbsp;author = models.ForeignKey(User)</div>
<div id="cke_pastebin">
	&nbsp;&nbsp; &nbsp;def __unicode__(self):</div>
<div id="cke_pastebin">
	&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return self.msg</div>
<div>
	&nbsp;</div>
<div>
	I have my admin site installed and it is working; I can add users. &nbsp;However, the author = models.ForiegnKey(User) in the model causes the error below when I load admin/msgboard/findmsg in my browser but if I get rid of that line, it works. &nbsp;Also interesting is that the 'author' line does not cause admin/msgboard/findmsg/add to fail; ie author shows up as a form item as it should.</div>
<div>
	&nbsp;</div>
<div>
	Here's the browser error:</div>
<div>
	&nbsp;</div>
<div>
	DatabaseError at /admin/msgboard/findmsg/</div>
<div>
	no such column: msgboard_findmsg.author_id</div>
<div>
	Request Method: GET</div>
<div>
	Request URL: http://127.0.0.1.8000/admin/msgboard/findmsg</div>
<div>
	Django Version: 1.3</div>
<div>
	Exception Type: Database Error</div>
<div>
	Exception Value: no such column: msgboard_findmsg.author_id</div>
<div>
	....</div>
<div>
	&nbsp;</div>
<div>
	Any ideas?</div>
<div>
	&nbsp;</div>
<div>
	Thanks,</div>
<div>
	Roland</div></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/8894">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-8896"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-8896" class="active">models.ForeignKey(User) Causes Admin Error</a></h2>

    <div class="submitted">Roland S - June 19, Sun 19:25.</div>
    <div class="content"><p>
	Alon,</p>
<p>
	Very interesting. &nbsp;I created a new project from scratch to try it again and it worked this time. The problem, I believe, was that I corrupted the original project's admin site by attempting to define my own User models. &nbsp;I guess this causes irreparable corruption or, at least, I don't know how to fix it.&nbsp;</p>
<p>
	Roland</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/8896">reply</a></li>
</ul></div>
</div>
</div><a id="comment-9966"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-9966" class="active">The only problem with this is</a></h2>

    <div class="submitted">Ferguzz - September 25, Sun 21:26.</div>
    <div class="content"><p>
	The only problem with this is that there is no profile caching like with get_profile(). &nbsp;So if you were to do something like...</p>
<p>
	&nbsp; &nbsp; user.profile.some_field = some_value</p>
<p>
	&nbsp; &nbsp; user.profile.save()</p>
<p>
	the user profile would not be updated!</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/9966">reply</a></li>
</ul></div>
</div>
<a id="comment-10238"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-10238" class="active">Django user registration system</a></h2>

    <div class="submitted">Ravi - October 14, Fri 08:04.</div>
    <div class="content"><p>
	I am very new to the Django. Can you help me to design a Django project which will create the user and their profiles. But I dont want to use default admin Django model. And these are accessable without admin login.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/10238">reply</a></li>
</ul></div>
</div>
<a id="comment-10533"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-10533" class="active">auto creation of the UserProfile</a></h2>

    <div class="submitted">val - October 29, Sat 03:18.</div>
    <div class="content"><p>
	What do you think of the ForienKey approach in combonation with a "User" post_save creation of the "UserProfile"? The following app is pluggable and takes care of all of that for you.</p>
<p>
	Mind you that the UserProfile class still needs to be created by developers and the delete() method on the UserProfile has to be updated to delete any non-user FK, M2M ... etc.</p>
<p>
	This the ForienKey approach recommended by James Bennette the release manager of Django.&nbsp;</p>
<p>
	<a href="https://github.com/un33k/django-bootup/blob/master/README" rel="nofollow">https://github.com/un33k/django-bootup/blob/master/README</a></p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/10533">reply</a></li>
</ul></div>
</div>
<a id="comment-11186"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-11186" class="active">I was facing problem of</a></h2>

    <div class="submitted">Truth About Abs - December 10, Sat 01:27.</div>
    <div class="content"><p>
	I was facing problem of creating profile.But your instructions helped me a lot.Thanks.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/11186">reply</a></li>
</ul></div>
</div>
<a id="comment-11193"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-11193" class="active">UserProfiles in a second database</a></h2>

    <div class="submitted">Szubi - December 10, Sat 08:44.</div>
    <div class="content"><p>
	Hello!</p>
<p>
	I'm building Django app on top of an existing database (MS SQL). I have to access some existing data in that database, so as a UserProfile model I've used an exitsting table. Everything works as expected, but using MSSQL and Apache on Windows drives me to a lot of problems so I decided to move to Linux + Apache + Postgres database - MyApp specific models will be handled by postgres database, but I still need to have access to for example MSSQL UserProfile table. Is there any way to do that? No success till now :-(</p>
<p>
	Regards</p>
<p>
	Szubi</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/11193">reply</a></li>
</ul></div>
</div>
<a id="comment-12152"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12152" class="active">Displaying profile?</a></h2>

    <div class="submitted">DF - February 11, Sat 08:29.</div>
    <div class="content"><p>
	Great info. But was wondering how to create a url to display the users profile along with a way for a user to add their own profile info with a form. Once a form is created from the UserProfile model, what kind of view would be required and accompanying url for that (would the id be user_id or profile_id)?</p>
<p>
	I'm trying to incorporate profiles from scratch as django-profiles is quite confusing and I'm kind of stuck at the point where profiles are automatically created when a uuser registers, but I want to not only display these, but also have a user able to input the detailed profile info on their own through a form.</p>
<p>
	Any help greatly appreciated as I've been at this for hours.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/12152">reply</a></li>
</ul></div>
</div>
<a id="comment-12161"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12161" class="active">Displaying profile</a></h2>

    <div class="submitted">Szubi - February 11, Sat 18:51.</div>
    <div class="content"><p>
	&nbsp;</p>
<p>
	in urls.py:</p>
<pre>(r'^settings/$', user_settings),  
    (r'^settings_changed/$', direct_to_template, {'template':'form_changed.html',
    'extra_context':{'message':'Settings has been changed','next':'/settings/'}}), 
</pre>
<p>
	Somewhere in views.py:</p>
<pre>@login_required
@csrf_protect
def user_settings(request):
    c = {}
    c.update(csrf(request))
    user = request.user
    profile = user.profile
    if request.method == 'POST': # If the form has been submitted...
        form = UserprofileForm(request.POST,instance=profile) # A form bound to the POST data
        if form.is_valid(): # All validation rules pass
            form.save()
            # Process the data in form.cleaned_data
            # ...
            return HttpResponseRedirect('/settings_changed/') # Redirect after POST
    else:
        user = request.user
        profile = user.profile
        form = UserprofileForm(instance=profile) # An unbound form
    return render_to_response('settings.html', locals(),context_instance=RequestContext(request))

</pre>
<p>
	In models.py:</p>
<pre>class UserprofileForm(ModelForm):
    class Meta:
        model = UserProfile
        fields = ('show_thumbnails','interface','style') #put fileds You want user to edit here

    def clean(self): # add custom validation here
        cleaned_data = self.cleaned_data
        interface = cleaned_data.get("interface")
        st  = cleaned_data.get("show_thumbnails")
        .........
        if field_interface_does_not_pass_validation_rules:
                # We know these are not in self._errors now (see discussion
                # below).
                msg = u"Invalid input blah blah!!"
                self._errors["interface"] = self.error_class([msg])

                # These fields are no longer valid. Remove them from the
                # cleaned data.
                del cleaned_data["interface"]

        # Always return the full collection of cleaned data.
        return cleaned_data

</pre>
<p>
	settings.html:</p>
<pre>{% extends "base.html" %}
{% block title %}Title text{% endblock %}
{% block content %}
 
{% if form.errors %}
&lt;p class="error"&gt;Invalid input&lt;/p&gt;
{% endif %}
&lt;form method="POST" action="/settings/"&gt;
{% csrf_token %}
&lt;table class="entryTable"&gt;
&lt;tbody&gt;
{{ form.as_table }}
&lt;br&gt;&lt;br&gt;
&lt;tr&gt;&lt;td class="buttons" colspan="2"&gt;
&lt;input type="button" class="button" value="Cancel" onclick="location.href='/0/';"/&gt;
&lt;input type="submit" class="button" value="Submit"/&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt;
{% endblock %}
</pre>
<p>
	That all ;-)</p>
<p>
	Szubi</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/12161">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-12294"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12294" class="active">Your URLs File</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/user/37478" title="View user profile.">dpbklyn</a> - February 23, Thu 17:00.</div>
    <div class="content"><p>
	@Szubi,</p>
<p>
	Can you please walk me through the URLs file you mention above, I am not sure I understand what each part does.</p>
<p>
	Thank you,</p>
<p>
	dp</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/12294">reply</a></li>
</ul></div>
</div>
</div><a id="comment-12279"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12279" class="active">using the user profile in a reverse lookup...</a></h2>

    <div class="submitted">David Phillips - February 22, Wed 19:14.</div>
    <div class="content"><p>
	Hello Alon and THANK YOU!!!</p>
<p>
	If I found this post last week it would have saved me about 5 days worth of coding and trobleshooting--THANK YOU!</p>
<p>
	I am new to Django and I am trying to set up a view that uses a reverse lookup in a url. &nbsp;How can I pass the the User's ID number to a url so the user moves from one form on his account (User Information) to another form on his account where he inputs information directly related to his account?&nbsp;</p>
<pre><span class="s1">#views.py</span>

def <span class="s2">regPage</span>(request):
    form = RegForm(request.POST)
<span class="s3">    </span># Save new/edited pick
    <span class="s1">if</span> request.method == <span class="s4">'POST'</span> <span class="s1">and</span> form.is_valid():
        form.save()
        <span class="s1">return</span> HttpResponseRedirect(reverse(<span class="s4">'league_page'</span>, args=(), kwargs={ <span class="s4">'id'</span> : id }))
<span class="s3">        </span>#return HttpResponseRedirect('/dev/leaguepage/')
    user_info = UserRegistration.objects.all()
    context = {
        <span class="s4">'form'</span>:form,
        <span class="s4">'user_info'</span> :user_info,
    }

    <span class="s1">return</span> render(request, <span class="s4">'regpage.html'</span>, context)

</pre>
<p class="p1">
	<span class="s1">def</span> <span class="s2">leaguePage</span>(request, id):</p>
<p class="p1">
	&nbsp; &nbsp; form = LeagueForm(request.POST <span class="s1">or</span> <span class="s1">None
</span>                instance=id <span class="s1">and</span> LeagueRegistration.objects.get(id=id))</p>
<p class="p3">
	<span class="s3">&nbsp; &nbsp; </span># Save new/edited pick</p>
<p class="p1">
	&nbsp; &nbsp; <span class="s1">if</span> request.method == <span class="s4">'POST'</span> <span class="s1">and</span> form.is_valid():
        form.save()
<span class="s1">        return</span> HttpResponseRedirect(<span class="s4">'/draft/'</span>)
    league_info = LeagueRegistration.objects.all()
    context = {</p>
<p class="p1">
	&nbsp; &nbsp; &nbsp; &nbsp; <span class="s4">'form'</span>:form,
<span class="s4">        'league_info'</span> :league_info,</p>
<p class="p1">
	}&nbsp;</p>
<p class="p1">
	&nbsp; &nbsp; <span class="s1">return</span> render(request, <span class="s4">'leaguepage.html'</span>, context)</p>
<pre>#urls.py

urlpatterns = patterns(<span class="s1">''</span>,

  

<span class="s2">    </span>#url(r'^leaguepage/$','acme.dc_django.views.leaguePage'),

<span class="s2">    url(r</span>'^user/(?P&lt;id&gt;\d+)/$'<span class="s2">,</span>'acme.dc_django.views.leaguePage'<span class="s2">, name=</span>"league_page"<span class="s2">),</span>

<span class="s2">    url(r</span>'^$'<span class="s2">, </span>'acme.dc_django.views.regPage'<span class="s2">),</span>

)</pre>
<p>
	Please not the above code doesn't work.&nbsp; This is the code I have been troubleshooting.</p>
<p>
	Thank you,</p>
<p>
	&nbsp;</p>
<p>
	dp</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/12279">reply</a></li>
</ul></div>
</div>
<div class="indented"><a id="comment-12284"></a>
<div class="comment comment-published odd">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12284" class="active">Never Mind the Above</a></h2>

    <div class="submitted"><a href="http://www.turnkeylinux.org/user/37478" title="View user profile.">dpbklyn</a> - February 23, Thu 04:49.</div>
    <div class="content"><p>
	I am steppig through your process and it is all (slowly) becomming clear to me.</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/12284">reply</a></li>
</ul></div>
</div>
</div><a id="comment-12913"></a>
<div class="comment comment-published even">

    
<h2 class="title"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12913" class="active">Took me time to read all the</a></h2>

    <div class="submitted">simon - April 16, Mon 10:58.</div>
    <div class="content"><p>Took me time to read all the comments, but I truly loved the article. It proved to be really useful to me and I am sure to all of the commenters here! It is usually good when you cannot only be informed, but additionally engaged! I am sure you had joy writing this article.</p>
<p>&nbsp;</p>
<p>&lt;a href="http://www.akaritutoring.com"&gt;English Tutor&lt;/a&gt;</p></div>

	      
    <div class="links"><ul class="links"><li class="comment_reply first last"><a href="http://www.turnkeylinux.org/comment/reply/1076/12913">reply</a></li>
</ul></div>
</div>
  <div class="box">
    <h2 class="title">Post new comment</h2>    <div class="content"><form action="http://www.turnkeylinux.org/comment/reply/1076" accept-charset="UTF-8" method="post" id="comment-form" onsubmit="return hashcash_create(&quot;hashcash-comment_form&quot;);">
<div><div class="form-item" id="edit-name-wrapper">
 <label for="edit-name">Your name: <span class="form-required" title="This field is required.">*</span></label>
 <input type="text" maxlength="60" name="name" id="edit-name" size="30" value="" class="form-text required">
</div>
<div class="form-item" id="edit-mail-wrapper">
 <label for="edit-mail">E-mail: </label>
 <input type="text" maxlength="64" name="mail" id="edit-mail" size="30" value="" class="form-text">
 <div class="description">The content of this field is kept private and will not be shown publicly. If you have a <a href="http://www.gravatar.com/">Gravatar</a> account, used to display your avatar.</div>
</div>
<div class="form-item" id="edit-subject-wrapper">
 <label for="edit-subject">Subject: </label>
 <input type="text" maxlength="64" name="subject" id="edit-subject" size="60" value="" class="form-text">
</div>
<div class="form-item" id="edit-comment-wrapper">
 <label for="edit-comment">Comment: <span class="form-required" title="This field is required.">*</span></label>
 <div class="resizable-textarea"><span><textarea cols="60" rows="15" name="comment" id="edit-comment" class="form-textarea resizable required ckeditor-mod filterxss2 textarea-processed ckeditor-processed" style="visibility: hidden; display: none; "></textarea><span id="cke_edit-comment" onmousedown="return false;" class="cke_skin_kama cke_editor_edit-comment" dir="ltr" title="" lang="zh-cn" tabindex="0" style="width: 682px;"><span class="cke_browser_webkit"><span class="cke_wrapper cke_ltr"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0"><tbody><tr style="-webkit-user-select: none; "><td id="cke_top_edit-comment" class="cke_top"><div class="cke_toolbox"><span id="cke_3" class="cke_toolbar"><span class="cke_toolbar_start"></span><span class="cke_rcombo"><span id="cke_4" class="cke_format cke_off"><span class="cke_label">格式</span><a hidefocus="true" title="格式" tabindex="-1" href="javascript:void('格式')" onkeydown="CKEDITOR.tools.callFunction( 4, event, this );" onclick="CKEDITOR.tools.callFunction(3, this); return false;"><span><span class="cke_accessibility">格式 </span><span id="cke_4_text" class="cke_text cke_inline_label">格式</span></span><span class="cke_openbutton"></span></a></span></span><span class="cke_toolgroup"><span class="cke_button"><a id="cke_5" class="cke_off cke_button_bold" href="javascript:void('加粗')" title="加粗" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(0, event);" onfocus="return CKEDITOR.ui.button._.focus(0, event);" onclick="CKEDITOR.tools.callFunction(5, this); return false;"><span class="cke_icon"></span><span class="cke_label">加粗</span></a></span><span class="cke_button"><a id="cke_6" class="cke_off cke_button_italic" href="javascript:void('倾斜')" title="倾斜" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(1, event);" onfocus="return CKEDITOR.ui.button._.focus(1, event);" onclick="CKEDITOR.tools.callFunction(6, this); return false;"><span class="cke_icon"></span><span class="cke_label">倾斜</span></a></span></span><span class="cke_separator"></span><span class="cke_toolgroup"><span class="cke_button"><a id="cke_7" class="cke_off cke_button_numberedlist" href="javascript:void('编号列表')" title="编号列表" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(2, event);" onfocus="return CKEDITOR.ui.button._.focus(2, event);" onclick="CKEDITOR.tools.callFunction(7, this); return false;"><span class="cke_icon"></span><span class="cke_label">编号列表</span></a></span><span class="cke_button"><a id="cke_8" class="cke_off cke_button_bulletedlist" href="javascript:void('项目列表')" title="项目列表" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(3, event);" onfocus="return CKEDITOR.ui.button._.focus(3, event);" onclick="CKEDITOR.tools.callFunction(8, this); return false;"><span class="cke_icon"></span><span class="cke_label">项目列表</span></a></span></span><span class="cke_separator"></span><span class="cke_toolgroup"><span class="cke_button"><a id="cke_9" class="cke_off cke_button_link" href="javascript:void('插入/编辑超链接')" title="插入/编辑超链接" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(4, event);" onfocus="return CKEDITOR.ui.button._.focus(4, event);" onclick="CKEDITOR.tools.callFunction(9, this); return false;"><span class="cke_icon"></span><span class="cke_label">插入/编辑超链接</span></a></span><span class="cke_button"><a id="cke_10" class="cke_off cke_button_unlink" href="javascript:void('取消超链接')" title="取消超链接" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(5, event);" onfocus="return CKEDITOR.ui.button._.focus(5, event);" onclick="CKEDITOR.tools.callFunction(10, this); return false;"><span class="cke_icon"></span><span class="cke_label">取消超链接</span></a></span><span class="cke_button"><a id="cke_11" class="cke_off cke_button_image" href="javascript:void('图象')" title="图象" tabindex="-1" hidefocus="true" onkeydown="return CKEDITOR.ui.button._.keydown(6, event);" onfocus="return CKEDITOR.ui.button._.focus(6, event);" onclick="CKEDITOR.tools.callFunction(11, this); return false;"><span class="cke_icon"></span><span class="cke_label">图象</span></a></span></span><span class="cke_toolbar_end"></span></span></div><a title="Collapse Toolbar" id="cke_12" class="cke_toolbox_collapser" onclick="CKEDITOR.tools.callFunction(12)"></a></td></tr><tr><td id="cke_contents_edit-comment" class="cke_contents" style="height:350px"><iframe style="width:100%;height:100%" frameborder="0" tabindex="-1" allowtransparency="true" title="富文本编辑器, edit-comment" name="富文本编辑器, edit-comment"></iframe></td></tr><tr style="-webkit-user-select: none; "><td id="cke_bottom_edit-comment" class="cke_bottom"><div id="cke_path_edit-comment" class="cke_path"><span class="cke_empty">&nbsp;</span></div><div class="cke_resizer" title="拖拽以改变尺寸" onmousedown="CKEDITOR.tools.callFunction(2, event)"></div></td></tr></tbody></table><style>.cke_skin_kama{visibility:hidden;}</style></span></span></span><div class="grippie" style="margin-right: -12px; display: none; "></div></span></div>
</div>
<ul class="tips"><li>Web page addresses and e-mail addresses turn into links automatically.</li><li>Allowed HTML tags:  &lt;a&gt; &lt;p&gt; &lt;span&gt; &lt;div&gt; &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;h4&gt; &lt;h5&gt; &lt;h6&gt; &lt;img&gt; &lt;map&gt; &lt;area&gt; &lt;hr&gt; &lt;br&gt; &lt;br /&gt; &lt;ul&gt; &lt;ol&gt; &lt;li&gt; &lt;dl&gt; &lt;dt&gt; &lt;dd&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;em&gt; &lt;b&gt; &lt;u&gt; &lt;i&gt; &lt;strong&gt; &lt;font&gt; &lt;del&gt; &lt;ins&gt; &lt;sub&gt; &lt;sup&gt; &lt;quote&gt; &lt;blockquote&gt; &lt;pre&gt; &lt;address&gt; &lt;code&gt; &lt;cite&gt; &lt;strike&gt; &lt;caption&gt;</li></ul><p><a href="http://www.turnkeylinux.org/filter/tips">More information about formatting options</a></p><input type="hidden" name="form_build_id" id="form-c93060dfbd10cc5f0d60e310eee72fe4" value="form-c93060dfbd10cc5f0d60e310eee72fe4">
<input type="hidden" name="form_id" id="edit-comment-form" value="comment_form">
<input type="hidden" name="hashcash" id="hashcash-comment_form" value="comment_form">
<div class="edit-title-wrapper"><div class="form-item" id="edit-title-wrapper">
 <input type="text" maxlength="128" name="title" id="edit-title" size="20" value="" class="form-text">
 <div class="description">Leave this field empty. It's part of a security mechanism.</div>
</div>
</div><div class="clear-block"><div class="form-item" id="edit-notify-wrapper">
 <label class="option" for="edit-notify"><input type="checkbox" name="notify" id="edit-notify" value="1" checked="checked" class="form-checkbox"> Notify me when new comments are posted</label>
</div>
<div class="form-radios"><div class="form-item" id="edit-notify-type-1-wrapper">
 <label class="option" for="edit-notify-type-1"><input type="radio" id="edit-notify-type-1" name="notify_type" value="1" checked="checked" class="form-radio"> All comments</label>
</div>
<div class="form-item" id="edit-notify-type-2-wrapper">
 <label class="option" for="edit-notify-type-2"><input type="radio" id="edit-notify-type-2" name="notify_type" value="2" class="form-radio"> Replies to my comment</label>
</div>
</div></div><input type="hidden" name="mollom[session_id]" id="edit-mollom-session-id" value="" class="mollom-session-id">
<div style="display: none;"><div class="form-item" id="edit-mollom-homepage-wrapper">
 <input type="text" maxlength="128" name="mollom[homepage]" id="edit-mollom-homepage" size="60" value="" title="Homepage" autocomplete="off" class="form-text">
</div>
</div><input type="submit" name="op" id="edit-preview" value="Preview" class="form-submit">
<div class="form-item" id="dear-spammers-wrapper">
 (Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)
</div>

</div></form>
</div>
 </div>

</div>
          
          </div>
        </div>

        <div id="footer" style="z-index: auto; ">
 <hr>
 <ul class="footer-sitemap">
  <li class="downloads"><span>Top downloads</span>
      <ul>
      <li><a href="http://www.turnkeylinux.org/lampstack">LAMP stack</a></li>
      <li><a href="http://www.turnkeylinux.org/fileserver">File server</a></li>
      <li><a href="http://www.turnkeylinux.org/joomla">Joomla</a></li>
      <li><a href="http://www.turnkeylinux.org/wordpress">Wordpress</a></li>
      <li><a href="http://www.turnkeylinux.org/redmine">Redmine</a></li>
      <li><a href="http://www.turnkeylinux.org/drupal6">Drupal</a></li>
      </ul>
  
  </li>
  <li class="about"><a href="http://www.turnkeylinux.org/about">About TurnKey</a>
      <ul>
      <li><a href="http://www.turnkeylinux.org/benefits">Why use TurnKey?</a></li>
      <li><a href="http://www.turnkeylinux.org/screenshots">Screenshots</a></li>
      <li><a href="http://www.turnkeylinux.org/blog">Blog</a> <a class="feed" href="http://www.turnkeylinux.org/blog/feed">&nbsp;</a> :: <a href="http://www.turnkeylinux.org/blog/news">News</a> <a class="feed" href="http://www.turnkeylinux.org/blog/news/feed">&nbsp;</a></li>

      <li><a href="http://www.turnkeylinux.org/mirrors">Mirrors</a> :: <a href="http://www.turnkeylinux.org/partners">Partners</a></li>
      <li><a href="http://www.turnkeylinux.org/help/conduct">Code of conduct</a></li>
      <li><a href="http://www.turnkeylinux.org/contact">Contact</a></li>
      </ul>
  </li>
  <li class="features"><a href="http://www.turnkeylinux.org/benefits">Features</a>
      <ul>
      <li><a href="http://www.turnkeylinux.org/core">Core: common base appliance</a></li>
      <li><a href="https://hub.turnkeylinux.org/">TurnKey Hub: cloud deployment</a></li>
      <li><a href="http://www.turnkeylinux.org/tklbam">TKLBAM: backup and migration</a></li>
      <li><a href="http://www.turnkeylinux.org/docs/cloudtask">CloudTask: cloud batch execution</a></li>
      <li><a href="http://www.turnkeylinux.org/docs/tklpatch">TKLPatch: customization SDK</a></li>
      </ul>
  
  </li>
  <li class="help"><a href="http://www.turnkeylinux.org/help">Help</a>
      <ul>
      <li><a href="http://www.turnkeylinux.org/forum">Forums</a></li>
      <li><a href="http://www.turnkeylinux.org/docs">Documentation</a></li>
      <li><a href="http://www.turnkeylinux.org/faq">Frequently Asked Questions</a></li>
      <li><a href="http://www.turnkeylinux.org/help/dev">Development</a></li>
      <li><a href="http://www.turnkeylinux.org/help/donate">Donate</a></li>
      </ul>
  </li>
  <li class="categories"><a href="http://www.turnkeylinux.org/all">Virtual appliances (45)</a>
      <ul>
      <li><a href="http://www.turnkeylinux.org/specials">Specials</a> (7)</li>
      <li><a href="http://www.turnkeylinux.org/web-development">Web development</a> (16)</li>
      <li><a href="http://www.turnkeylinux.org/cms">Content management</a> (23)</li>
      <li><a href="http://www.turnkeylinux.org/messaging">Messaging</a> (6)</li>
      <li><a href="http://www.turnkeylinux.org/issue-tracking">Issue tracking</a> (10)</li>
      </ul>
  
  </li>

 </ul>
 
 <div class="copyright">© 2008-2012 Turnkey Linux - All rights reserved</div>
 <div id="footer-border">&nbsp;</div>

</div>

        <div id="topNav">

  <div class="block block-superfish" id="block-superfish-1">


    <div class="content"><ul class="sf-menu sf-horizontal sf-style-default sf-js-enabled sf-shadow" id="superfish-1">
<li id="menu-2953-1" class="first odd sf-item-1 menuparent"><a href="http://www.turnkeylinux.org/all" title="Listing of all TurnKey Linux virtual appliances" class="sf-with-ul">Apps<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2954-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/specials" title="" style="float: none; width: auto; ">Specials</a></li>
<li id="menu-2955-1" class="even sf-item-2 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/web-development" title="" style="float: none; width: auto; " class="sf-with-ul">Web development<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2956-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/framework" title="" style="float: none; width: auto; ">Framework</a></li>
<li id="menu-2957-1" class="last even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/stacks" title="" style="float: none; width: auto; ">Stack</a></li>
</ul>
</li>
<li id="menu-2958-1" class="odd sf-item-3 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/cms" title="" style="float: none; width: auto; " class="sf-with-ul">Content management<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2959-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/blogging" title="" style="float: none; width: auto; ">Blogging</a></li>
<li id="menu-2960-1" class="even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/wiki" title="" style="float: none; width: auto; ">Wiki</a></li>
<li id="menu-2961-1" class="last odd sf-item-3" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/ecommerce" title="" style="float: none; width: auto; ">Ecommerce</a></li>
</ul>
</li>
<li id="menu-2962-1" class="even sf-item-4 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/messaging" title="" style="float: none; width: auto; " class="sf-with-ul">Messaging<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2963-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/email" title="" style="float: none; width: auto; ">Email</a></li>
<li id="menu-2964-1" class="last even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/taxonomy/term/25" title="" style="float: none; width: auto; ">Forum</a></li>
</ul>
</li>
<li id="menu-2965-1" class="odd sf-item-5 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/issue-tracking" title="" style="float: none; width: auto; " class="sf-with-ul">Issue tracking<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2966-1" class="first last odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/project-management" title="" style="float: none; width: auto; ">Project management</a></li>
</ul>
</li>
<li id="menu-2967-1" class="even sf-item-6" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/database" title="" style="float: none; width: auto; ">Database</a></li>
<li id="menu-2968-1" class="last odd sf-item-7" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/sdk" title="" style="float: none; width: auto; ">SDK</a></li>
</ul>
</li>
<li id="menu-84-1" class="even sf-item-2 menuparent"><a href="http://www.turnkeylinux.org/help" title="" class="sf-with-ul">Help<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2667-1" class="first odd sf-item-1 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/forum" title="" style="float: none; width: auto; " class="sf-with-ul">Forums<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2668-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/forum/support" title="" style="float: none; width: auto; ">Support</a></li>
<li id="menu-2669-1" class="last even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/forum/general" title="" style="float: none; width: auto; ">General</a></li>
</ul>
</li>
<li id="menu-2670-1" class="even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/docs" title="" style="float: none; width: auto; ">Documentation</a></li>
<li id="menu-71-1" class="odd sf-item-3" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/faq" title="Frequently Asked Questions" style="float: none; width: auto; ">Questions &amp; Answers</a></li>
<li id="menu-2671-1" class="last even sf-item-4 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/help/dev" title="" style="float: none; width: auto; " class="sf-with-ul">Development<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2672-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/docs/tklpatch" title="" style="float: none; width: auto; ">SDK</a></li>
<li id="menu-2673-1" class="even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://wiki.turnkeylinux.org/" title="" style="float: none; width: auto; ">Wiki</a></li>
<li id="menu-2674-1" class="odd sf-item-3" style="float: left; width: 100%; white-space: normal; "><a href="https://blueprints.launchpad.net/turnkeylinux" title="" style="float: none; width: auto; ">Blueprints</a></li>
<li id="menu-2675-1" class="even sf-item-4" style="float: left; width: 100%; white-space: normal; "><a href="https://bugs.launchpad.net/turnkeylinux" title="" style="float: none; width: auto; ">Bug tracker</a></li>
<li id="menu-2676-1" class="odd sf-item-5" style="float: left; width: 100%; white-space: normal; "><a href="http://code.turnkeylinux.org/" title="" style="float: none; width: auto; ">Code</a></li>
<li id="menu-2677-1" class="last even sf-item-6" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/polls" title="" style="float: none; width: auto; ">Polls</a></li>
</ul>
</li>
</ul>
</li>
<li id="menu-77-1" class="odd sf-item-3 menuparent"><a href="http://www.turnkeylinux.org/blog" title="" class="sf-with-ul">Blog<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2679-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/blog" title="" style="float: none; width: auto; ">Category: All</a></li>
<li id="menu-2678-1" class="even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/blog/news" title="" style="float: none; width: auto; ">Category: News</a></li>
<li id="menu-2934-1" class="odd sf-item-3" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/announcements" title="News and Security Announcements Newsletter" style="float: none; width: auto; ">E-mail Newsletter</a></li>
<li id="menu-2680-1" class="last even sf-item-4 menuparent" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/blog/feed" title="" style="float: none; width: auto; " class="sf-with-ul">Follow us<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; left: 12em; float: none; width: 12em; visibility: hidden; ">
<li id="menu-2794-1" class="first odd sf-item-1" style="float: left; width: 100%; white-space: normal; "><a href="http://www.facebook.com/turnkeylinux" title="" style="float: none; width: auto; ">Facebook</a></li>
<li id="menu-2683-1" class="even sf-item-2" style="float: left; width: 100%; white-space: normal; "><a href="http://twitter.com/turnkeylinux" title="" style="float: none; width: auto; ">Twitter</a></li>
<li id="menu-2681-1" class="odd sf-item-3" style="float: left; width: 100%; white-space: normal; "><a href="http://www.turnkeylinux.org/blog/feed" title="" style="float: none; width: auto; ">RSS feed</a></li>
<li id="menu-2682-1" class="last even sf-item-4" style="float: left; width: 100%; white-space: normal; "><a href="http://feedburner.google.com/fb/a/mailverify?uri=turnkeylinux-blog" title="" style="float: none; width: auto; ">Email</a></li>
</ul>
</li>
</ul>
</li>
<li id="menu-1735-1" class="even sf-item-4"><a href="http://www.turnkeylinux.org/screenshots" title="">Screenshots</a></li>
<li id="menu-2168-1" class="last odd sf-item-5"><a href="https://hub.turnkeylinux.org/" title="Cloud Backups and Server Deployment">TurnKey Hub</a></li>
</ul>
</div>
 </div>

    <div class="logged_out" id="account"> 

    <a href="http://www.turnkeylinux.org/user?destination=node%2F1076" title="Log into your account (supports OpenID)">Log in</a> | <a href="http://www.turnkeylinux.org/user/register" title="Create new account">Register</a>    </div>

    <form action="./User Profiles_files/User Profiles.htm" accept-charset="UTF-8" method="post" id="search-theme-form" class="search-form" target="_self">
<div><div id="search" class="container-inline">
  <div class="form-item" id="edit-search-theme-form-1-wrapper">
 <label class="element-invisible" for="edit-search-theme-form-1">Search this site: </label>
 <input type="text" maxlength="128" name="search_theme_form" id="edit-search-theme-form-1" size="15" value="Search" title="Enter the terms you wish to search for." class="form-text  custom-search-default-value custom-search-box">
</div>
<fieldset class="custom_search-popup custom_search-processed"><div class="custom-search-selector custom-search-types"><div class="form-item">
 <label>Refine your search: </label>
 <div class="form-radios"><div class="form-item" id="edit-custom-search-types-c-all-wrapper">
 <label class="option" for="edit-custom-search-types-c-all"><input type="radio" id="edit-custom-search-types-c-all" name="custom_search_types" value="c-all" checked="checked" class="form-radio"> All</label>
</div>
<div class="form-item" id="edit-custom-search-types-c-appliance-wrapper">
 <label class="option" for="edit-custom-search-types-c-appliance"><input type="radio" id="edit-custom-search-types-c-appliance" name="custom_search_types" value="c-appliance" class="form-radio"> Appliance</label>
</div>
<div class="form-item" id="edit-custom-search-types-c-blog-wrapper">
 <label class="option" for="edit-custom-search-types-c-blog"><input type="radio" id="edit-custom-search-types-c-blog" name="custom_search_types" value="c-blog" class="form-radio"> Blog</label>
</div>
<div class="form-item" id="edit-custom-search-types-c-doc-wrapper">
 <label class="option" for="edit-custom-search-types-c-doc"><input type="radio" id="edit-custom-search-types-c-doc" name="custom_search_types" value="c-doc" class="form-radio"> Documentation</label>
</div>
<div class="form-item" id="edit-custom-search-types-c-forum-wrapper">
 <label class="option" for="edit-custom-search-types-c-forum"><input type="radio" id="edit-custom-search-types-c-forum" name="custom_search_types" value="c-forum" class="form-radio"> Forum topic</label>
</div>
</div>
</div>
</div><a class="custom_search-popup-close" href="http://www.turnkeylinux.org/blog/django-profile#">Close</a></fieldset>
<input type="image" name="op" value="Search" id="edit-submit-1" alt="Search" class="form-submit custom-search-button" src="./User Profiles_files/icon-search.png">
<input type="hidden" name="form_build_id" id="form-728c34f9b9d991f39082e65b3e35083b" value="form-728c34f9b9d991f39082e65b3e35083b">
<input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form">
<input type="hidden" name="default_text" id="edit-default-text" value="Search" class="default-text">
</div>

</div></form>

</div>

                <div id="sidebar-left" class="sidebar">  <div class="block block-user" id="block-user-1">


    <div class="content"><ul class="menu"><li class="collapsed first"><a href="http://www.turnkeylinux.org/help">Help</a></li>
<li class="collapsed last"><a href="http://www.turnkeylinux.org/all" title="Listing of all TurnKey Linux virtual appliances">Virtual appliances</a></li>
</ul></div>
 </div>
  <div class="block block-simplenews" id="block-simplenews-48">

    <h3>News and Security Announcements</h3>

    <div class="content">      <p>Low-traffic newsletter: up to one email a month.</p>
  
      <form action="./User Profiles_files/User Profiles.htm" accept-charset="UTF-8" method="post" id="simplenews-block-form-48">
<div><div class="form-item" id="edit-mail-1-wrapper">
 <label for="edit-mail-1">Email: <span class="form-required" title="This field is required.">*</span></label>
 <input type="text" maxlength="128" name="mail" id="edit-mail-1" size="20" value="" class="form-text required">
</div>
<div class="form-radios"><div class="form-item" id="edit-action-subscribe-wrapper">
 <label class="option" for="edit-action-subscribe"><input type="radio" id="edit-action-subscribe" name="action" value="subscribe" checked="checked" class="form-radio"> Subscribe</label>
</div>
<div class="form-item" id="edit-action-unsubscribe-wrapper">
 <label class="option" for="edit-action-unsubscribe"><input type="radio" id="edit-action-unsubscribe" name="action" value="unsubscribe" class="form-radio"> Unsubscribe</label>
</div>
</div><input type="submit" name="op" id="edit-submit" value="Save" class="form-submit">
<input type="hidden" name="form_build_id" id="form-81dc3642011303db4e8e45510f33da40" value="form-81dc3642011303db4e8e45510f33da40">
<input type="hidden" name="form_id" id="edit-simplenews-block-form-48" value="simplenews_block_form_48">

</div></form>
  
      <div class="issues-link"><a href="http://www.turnkeylinux.org/announcements">Previous issues</a></div>
  
  
      <a href="http://www.turnkeylinux.org/taxonomy/term/48/0/feed" class="feed-icon"><img src="./User Profiles_files/feed.png" alt="Syndicate content" title="News and Security Announcements feed" width="16" height="16"></a>  </div>
 </div>
  <div class="block block-block" id="block-block-16">


    <div class="content"><iframe src="data:text/html,chromewebdata" scrolling="no" frameborder="0" style="margin-left: 8px; border:none; overflow:hidden; width:195px; height:373px;" allowtransparency="true"></iframe></div>
 </div>
  <div class="block block-tagadelic" id="block-tagadelic-7">

    <h3>Categories</h3>

    <div class="content"><a href="http://www.turnkeylinux.org/blog/amazon" class="tagadelic level1" rel="tag">amazon</a> 
<a href="http://www.turnkeylinux.org/blog/appliances" class="tagadelic level2" rel="tag">appliances</a> 
<a href="http://www.turnkeylinux.org/blog/aws" class="tagadelic level3" rel="tag">aws</a> 
<a href="http://www.turnkeylinux.org/blog/backup" class="tagadelic level1" rel="tag">backup</a> 
<a href="http://www.turnkeylinux.org/blog/cloud" class="tagadelic level3" rel="tag">cloud</a> 
<a href="http://www.turnkeylinux.org/blog/community" class="tagadelic level1" rel="tag">community</a> 
<a href="http://www.turnkeylinux.org/blog/core" class="tagadelic level1" rel="tag">core</a> 
<a href="http://www.turnkeylinux.org/blog/debian" class="tagadelic level1" rel="tag">debian</a> 
<a href="http://www.turnkeylinux.org/blog/development" class="tagadelic level3" rel="tag">development</a> 
<a href="http://www.turnkeylinux.org/blog/django" class="tagadelic level1" rel="tag">django</a> 
<a href="http://www.turnkeylinux.org/blog/drupal" class="tagadelic level2" rel="tag">drupal</a> 
<a href="http://www.turnkeylinux.org/blog/ec2" class="tagadelic level3" rel="tag">ec2</a> 
<a href="http://www.turnkeylinux.org/blog/hub" class="tagadelic level3" rel="tag">hub</a> 
<a href="http://www.turnkeylinux.org/blog/news" class="tagadelic level3" rel="tag">news</a> 
<a href="http://www.turnkeylinux.org/blog/python" class="tagadelic level1" rel="tag">python</a> 
<a href="http://www.turnkeylinux.org/blog/s3" class="tagadelic level1" rel="tag">s3</a> 
<a href="http://www.turnkeylinux.org/blog/security" class="tagadelic level1" rel="tag">security</a> 
<a href="http://www.turnkeylinux.org/blog/tklbam" class="tagadelic level2" rel="tag">tklbam</a> 
<a href="http://www.turnkeylinux.org/blog/ubuntu" class="tagadelic level2" rel="tag">ubuntu</a> 
<a href="http://www.turnkeylinux.org/blog/web" class="tagadelic level1" rel="tag">web</a> 
<div class="more-link"><a href="http://www.turnkeylinux.org/tagadelic/chunk/7">more tags</a></div></div>
 </div>
  <div class="block block-views" id="block-views-blog-block_3">

    <h3>Recent posts</h3>

    <div class="content"><div class="view view-blog view-id-blog view-display-id-block_3 view-dom-id-1 views-processed">
    
  
  
      <div class="view-content">
      <div class="item-list">
    <ul>
          <li class="views-row views-row-1 views-row-odd views-row-first">  
  <div class="views-field-title">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/core-rc-squeeze-builds">TurnKey Core 12.0 RC optimized builds</a></span>
  </div>
  
  <div class="views-field-created">
                <span class="field-content">16th Apr, 2012</span>
  </div>
</li>
          <li class="views-row views-row-2 views-row-even">  
  <div class="views-field-title">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/hub-snapshots">New Hub feature: Server snapshots</a></span>
  </div>
  
  <div class="views-field-created">
                <span class="field-content">4th Apr, 2012</span>
  </div>
</li>
          <li class="views-row views-row-3 views-row-odd">  
  <div class="views-field-title">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/core-rc-squeeze">TurnKey Core 12.0 RC based on Debian Squeeze</a></span>
  </div>
  
  <div class="views-field-created">
                <span class="field-content">1st Mar, 2012</span>
  </div>
</li>
          <li class="views-row views-row-4 views-row-even">  
  <div class="views-field-title">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/fast-rsync-mirrors">Rsync the entire TurnKey library from a mirror close to you in under 5 minutes!</a></span>
  </div>
  
  <div class="views-field-created">
                <span class="field-content">22nd Feb, 2012</span>
  </div>
</li>
          <li class="views-row views-row-5 views-row-odd views-row-last">  
  <div class="views-field-title">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/announcing-xen-builds">Announcing TurnKey Xen optimized builds</a></span>
  </div>
  
  <div class="views-field-created">
                <span class="field-content">10th Feb, 2012</span>
  </div>
</li>
      </ul>
</div>    </div>
  
      <div class="item-list"><ul class="pager"><li class="pager-previous first">&nbsp;</li>
<li class="pager-current">1 of 24</li>
<li class="pager-next last"><a href="http://www.turnkeylinux.org/blog/django-profile?page=1" class="active">››</a></li>
</ul></div>  
  
  
  
  
</div> </div>
 </div>
  <div class="block block-views" id="block-views-recent_comments-block_2">

    <h3>Recent comments</h3>

    <div class="content"><div class="view view-recent-comments view-id-recent_comments view-display-id-block_2 view-dom-id-2">
    
  
  
      <div class="view-content">
      <div class="item-list">
    <ul>
          <li class="views-row views-row-1 views-row-odd views-row-first">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/django-profile#comment-12913" class="active">Took me time to read all the</a></span>
  </div>
</li>
          <li class="views-row views-row-2 views-row-even">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/announcing-openstack-builds#comment-12909">TurnKey Core 12.0rc available for OpenStack</a></span>
  </div>
</li>
          <li class="views-row views-row-3 views-row-odd">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/openvz-proxmox#comment-12891">Guessing you probably found the answer by now...</a></span>
  </div>
</li>
          <li class="views-row views-row-4 views-row-even">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/openvz-proxmox#comment-12886">TurnKey Core 12.0rc now available in TurnKey PVE channel</a></span>
  </div>
</li>
          <li class="views-row views-row-5 views-row-odd">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/hub-snapshots#comment-12881">From my understanding</a></span>
  </div>
</li>
          <li class="views-row views-row-6 views-row-even">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/hub-snapshots#comment-12878">Benefits over TKLBAM</a></span>
  </div>
</li>
          <li class="views-row views-row-7 views-row-odd views-row-last">  
  <div class="views-field-subject">
                <span class="field-content"><a href="http://www.turnkeylinux.org/blog/openvz-proxmox#comment-12868">Re installed</a></span>
  </div>
</li>
      </ul>
</div>    </div>
  
  
  
  
  
  
</div> </div>
 </div>
  <div class="block block-views" id="block-views-archive-block">

    <h3>Archive</h3>

    <div class="content"><div class="view view-archive view-id-archive view-display-id-block view-dom-id-3 views-processed">
    
  
  
      <div class="view-content">
      <div class="item-list">
  <ul class="views-summary">
      <li><a href="http://www.turnkeylinux.org/blog/archive/201204">April 2012</a>
              (2)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201203">March 2012</a>
              (1)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201202">February 2012</a>
              (3)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201201">January 2012</a>
              (1)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201112">December 2011</a>
              (4)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201111">November 2011</a>
              (4)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201110">October 2011</a>
              (3)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201109">September 2011</a>
              (3)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201108">August 2011</a>
              (3)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201107">July 2011</a>
              (3)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201106">June 2011</a>
              (4)
          </li>
      <li><a href="http://www.turnkeylinux.org/blog/archive/201105">May 2011</a>
              (5)
          </li>
    </ul>
</div>
    </div>
  
  
  
  
  
  
</div> </div>
 </div>
</div>
        
        

<ul id="fixedbtns">        

<li class="side_facebook"><a title="Find us on Facebook" href="http://www.facebook.com/turnkeylinux"></a></li>

<li class="side_twitter"><a title="Follow us on Twitter" href="http://twitter.com/turnkeylinux"></a></li>

<li class="side_rss"><a title="Subscribe to our blog" href="http://www.turnkeylinux.org/blog/feed"></a></li>
</ul>


      </div>

      <div id="left">&nbsp;</div>
      <div id="right">&nbsp;</div>
      <div id="bottom">&nbsp;</div>
      <div id="bg-right">&nbsp;</div>
      <div id="bottom-right">&nbsp;</div>
    </div>

    <div id="bg-left">&nbsp;</div>
    <div id="bottom-left">&nbsp;</div>

  </div>

  <script type="text/javascript">
<!--//--><![CDATA[//><!--
var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-5294846-3"]);_gaq.push(['_setCustomVar', 1, "roles", "anonymous user", 3]);_gaq.push(['_setCustomVar', 2, "node", "blog", 3]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
//--><!]]>
</script>



</body></html>